import Vue from "vue";
import $ from "jquery";
import com from "../../utils/common"
let viewAddFooter = {};
viewAddFooter.Temp = `
<div class="add-msg">
    <div class="business_tel" v-if="mobile">
        <a :href="'tel:' + mobile ">联系商家</a>
    </div>
    <div class="footer preview-footer">
        <a href="javascript:;">继续编辑活动</a>
        <a href="javascript:;">发布活动</a>
    </div>
    <div class="push_footer">
        <p class="close-footer" v-on:click="closeFooter"><img src="../../../img/common/close.png"></p>
        <p>我也要制作发布营销活动<a href="https://mp.weixin.qq.com/s/tnbAK7IgRGZrUORt4bS-qw">客牛&gt;&gt;</a></p>
    </div>
</div>
`;
let ViewAddMsg = Vue.extend({
  template: viewAddFooter.Temp,
  props: ["mobile"],
  mounted(){
    let ispreview = com.getUrlParam("preview") ? com.getUrlParam("preview") : 0;
    let actid = com.getUrlParam("actid") ? com.getUrlParam("actid") : 1;
    let joinid = com.getUrlParam("joinid") ? com.getUrlParam("joinid") : 1;
    if (ispreview) {
      $(".push_footer,.footer").hide();
      $(".preview-footer").show();
      $(".activity_status").html("<div class='first_want_join'>我要参加</div>")
    } else {
      $(".preview-footer").hide();
      // 当是商家保存完活动打开页面后
    }
  },
  methods: {
    closeFooter:function(){
      $(".push_footer").hide()
      $(".footer").css("bottom",0);
    }
  }
});
export default ViewAddMsg;
